<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Subtrahierer</title>
</head>

<body bgcolor="FFFFFF">

<h1><img align="center" src="../../../../icons/subtractor.gif" width="32" height="32">
<em>Subtrahierer</em></h1>

<p><table>
<tr><td><strong>Bibliothek:</strong></td>
	<td><a href="index.html">Arithmetic</a></td></tr>
<tr><td><strong>Eingeführt:</strong></td>
	<td>2.0 Beta 11</td></tr>
<tr><td valign="top"><strong>Aussehen:</strong></td>
	<td valign="top"><img src="../../../../img-libs/subtractor.png" width="44" height="45"></td></tr>
</table></p>

<h2>Verhalten</h2>

<p>This component subtracts values coming in via the west inputs
(the upper minus the lower) and outputs the difference on the east
output. The component is designed so that it can be cascaded with other
subtractors to provide subtract more bits than is possible with a single
subtractor: The borrow-in input provides a one-bit value to be borrowed
out of the difference (if the borrow-in input is specified), and a
borrow-out output indicates whether the component needs to borrow an
upper-order bit to complete the subtraction without underflow (assuming
unsigned subtraction).</p>

<p>Internally, the subtractor simply performs a bitwise NOT on the
subtrahend, and add this to the minuend along with the NOT of the
borrow-in input. (The <em>minuend</em> is the first operand (upper
input) to the subtraction, and the <em>subtrahend</em> is the second
(lower input). I happen to like the antiquated terms.)</p>

<p>If either of the operands contains some floating bits or some error
bits, then the component will perform a partial subtraction. That is, it
will compute as many low-order bits as possible. But above the floating
or error bit, the result will have floating or error bits.</p>

<h2>Pins</h2>

<dl>

<dt>West edge, north end (input, bit width matches Data Bits attribute)
<dd>The minuend of the subtraction; that is, the number from which to
subtract.

<dt>West edge, south end (input, bit width matches Data Bits attribute)
<dd>The subtrahend of the subtraction; that is, the number to subtract
from the minuend.

<dt>North edge, labeled <var>b in</var> (input, bit width 1)
<dd>If 1, then 1 is borrowed out of the difference. If the value is
unknown (i.e., floating), then it is assumed to be 0.

<dt>East edge (output, bit width matches Data Bits attribute)
<dd>The lower <var>dataBits</var> bits of the difference of the two
values coming in the west edge, minus the
<var>b</var><sub><var>in</var></sub> bit.

<dt>South edge, labeled <var>b out</var> (output, bit width 1)
<dd>The borrow bit computed for the difference. If the values subtracted
as unsigned values yield a negative value, then this bit will be 1;
otherwise, it will be 0.

</dl>

<h2>Attribute</h2>

<p>When the component is selected or being added,
Alt-0 through Alt-9 alter its <q>Data Bits</q> attribute.</p>

<dl>

<dt>Data Bits</dt>
<dd>The bit width of the values to be subtracted and of the result.</dd>

</dl>

<h2>Verhalten des Schaltwerkzeugs</h2>

<p>Keines.</p>

<h2>Verhalten des Textwerkzeugs</h2>

<p>Keines.</p>

<p><a href="../index.html">Zurück zur <em>Bibliotheksreferenz</em></a></p>

</body>
</html>
